<template>
  <div class="param-info">
    <table v-for="(table,index) in paramInfo.sizes" :key="index">
      <tr v-for="(tr,indey) in table" :key="indey">
        <td v-for="(td,indez) in tr" :key="indez">{{td}}</td>
      </tr>
    </table>
    <table class="info-param">
      <tr v-for="(info,index) in paramInfo.infos">
        <td class="info-param-key">{{info.key}}</td>
        <td class="param-value">{{info.value}}</td>
      </tr>
    </table>
    <div class="info-img" v-if="paramInfo.image">
      <img :src="paramInfo.image[0]" alt="">
    </div>
  </div>
</template>

<script>
  export default {
    name: "DetailParamInfo",
    props: {
      paramInfo: {
        type: Object,
        default() {
          return {}
        }
      }
    }
  }
</script>

<style scoped>
  .param-info {
    padding: 20px 15px 0 15px;
    font-size: 14px;
    color: #666666;
    border-bottom: 5px solid #f2f5f8;
  }
  .param-info table {
    width: 100%;
    border-collapse: collapse;
  }
  .param-info table tr {
    height: 40px;
  }
  .param-info table tr td {
    border-bottom: 1px solid rgba(0,0,0,.1);
  }
  .info-param-key {
    width: 95px;
  }
  .param-value {
    color: cadetblue;
  }
  .info-img img {
    width: 100%;
  }
  .info-param {
    border-top: 1px solid grey;
  }
</style>
